package com.example.wxordersystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.wxordersystem.entity.OrderDetail;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author 常红伟
 */
public interface OrderDetailMapper extends BaseMapper<OrderDetail> {

    /**
     *根据订单号查询所有属于这个订单下的商品
     * @param orderId 订单ID
     * @return 返回属于这个订单下所有的商品
     */
    @Select("select * from order_detail where order_id =#{orderId} ")
    public List<OrderDetail> findByOrderId(String orderId);

}
